-- factorial.lua
-- alejandro varela

function factorial (n)
	if (n <= 1) then
		return 1
	else
		return n * factorial (n-1)
	end
end

function main ()

	for i = 1, 25 do
		print (tostring(i) .. "!\t\t" .. tostring(factorial(i)))
		-- print (i)
	end

	-- print ('ingrese un número: ')
	-- n = io.read ('*number')
	-- print (factorial(n))
end

main ()

